//
//  UIView+Frame.m
//  XiJianChui
//
//  Created by aaa on 16/7/19.
//  Copyright © 2016年 FanShuHan. All rights reserved.
//

#import "UIView+Frame.h"

@implementation UIView (Frame)

- (void)setFsh_height:(CGFloat)fsh_height
{
    CGRect rect = self.frame;
    rect.size.height = fsh_height;
    self.frame = rect;
}

- (CGFloat)fsh_height
{
    return self.frame.size.height;
}

- (CGFloat)fsh_width
{
    return self.frame.size.width;
}
- (void)setFsh_width:(CGFloat)fsh_width
{
    CGRect rect = self.frame;
    rect.size.width = fsh_width;
    self.frame = rect;
}

- (CGFloat)fsh_x
{
    return self.frame.origin.x;
    
}

- (void)setFsh_x:(CGFloat)fsh_x
{
    CGRect rect = self.frame;
    rect.origin.x = fsh_x;
    self.frame = rect;
}

- (void)setFsh_y:(CGFloat)fsh_y
{
    CGRect rect = self.frame;
    rect.origin.y = fsh_y;
    self.frame = rect;
}

- (CGFloat)fsh_y
{
    
    return self.frame.origin.y;
}

- (void)setFsh_centerX:(CGFloat)fsh_centerX
{
    CGPoint center = self.center;
    center.x = fsh_centerX;
    self.center = center;
}

- (CGFloat)fsh_centerX
{
    return self.center.x;
}

- (void)setFsh_centerY:(CGFloat)fsh_centerY
{
    CGPoint center = self.center;
    center.y = fsh_centerY;
    self.center = center;
}

- (CGFloat)fsh_centerY
{
    return self.center.y;
}
@end
